import request from '@/utils/request'

export default {

  //1.根据课程ID生成对应的订单
  createOrder(courseId){
    return request({
      url: `/order/create/${courseId}`,
      method: 'post'
    })
  },

  //2.根据订单号获取订单信息
  getOrderInfoByOrderNum(orderId){
    return request({
      url: `/order/get/order/info/${orderId}`,
      method: 'get'
    })
  },

  //3.生成订单二维码的方法
  createNative(orderNum){
    return request({
      url: `/order/log/create/native/${orderNum}`,
      method: 'get'
    })
  },

  //4.查询订单状态
  getOrderStatus(orderNum){
    return request({
      url: `/order/log/get/order/status/${orderNum}`,
      method: 'get'
    })
  }
}
